<%--
  Created by IntelliJ IDEA.
  User: zhangye
  Date: 2020-05-08
  Time: 20:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <!-- Required meta tags -->
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
          integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <title>myCart</title>
</head>
<body>
<%@include file="common/navbar.jsp" %>
<span>${message}</span>
<div class="row">
<c:forEach var="item" items="${carts}">
    <div class="col-sm-3">
            <%--<div class="card text-white bg-success mb-3" style="max-width: 18rem;">--%>
                <div class="card border-success mb-3" style="max-width: 18rem;">
                <div class="card-header">已加入购物车</div>
                <div class="card-body">
                    <h5 class="card-title">商品名称：${item.name}</h5>
                    <p class="card-text">数量：${item.count}</p>
                    <p class="card-text">单价：${item.price}</p>
                    <a href="/toBuy?cartId=${item.cartId}" class="btn btn-primary">去结算</a>
                </div>
            </div>
    </div>
</c:forEach>
</div>

</body>
</html>
